package top.jfunc.common.thread;

import java.util.concurrent.Executor;

public class ThreadPoolUtil {
    private ThreadPoolUtil() {
    }

    public static void runInTreadPool(Runnable runnable, Executor executor) {
        if (null == executor) {
            runnable.run();
        }
        else {
            executor.execute(runnable);
        }

    }
}
